<form action="" method="POST">
    <input type="text" name="tweet" />
    <br><input type="submit" value="Gonder" />
</form>

<?php
error_reporting(0); //hide all error message

//class download link: https://github.com/tijsverkoyen/TwitterOAuth/
include ('class/twitter.php'); //include twitter class

$twitter = new Twitter('', ''); //consumer & consumer secret key

//Your access token

$twitter->setOAuthToken(''); //access token
$twitter->setOAuthTokenSecret(''); //access token secret

$tweet = $_POST['tweet'];

$twitter->statusesUpdate($tweet);


?>